package org.example.coffeeshoporderingsystem.order.entity;


import org.example.coffeeshoporderingsystem.common.enitty.BaseEntity;
import org.example.coffeeshoporderingsystem.member.entity.Member;
import org.example.coffeeshoporderingsystem.store.entity.Store;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;


public class Order extends BaseEntity {
    private Integer orderId;
    private Member member;
    private Store store;
    private Double totalAmount;
    private String status;
    private LocalDateTime createdAt;
    private LocalDateTime updatedAt;
    private List<OrderDetail> orderDetailList = new ArrayList<>();

    public Order() {
    }

    public Order(Integer orderId, Member member, Store store, Double totalAmount, String status, LocalDateTime createdAt, LocalDateTime updatedAt, List<OrderDetail> orderDetailList) {
        this.orderId = orderId;
        this.member = member;
        this.store = store;
        this.totalAmount = totalAmount;
        this.status = status;
        this.createdAt = createdAt;
        this.updatedAt = updatedAt;
        this.orderDetailList = orderDetailList;
    }

    public Integer getOrderId() {
        return orderId;
    }

    public void setOrderId(Integer orderId) {
        this.orderId = orderId;
    }

    public Member getMember() {
        return member;
    }

    public void setMember(Member member) {
        this.member = member;
    }

    public Store getStore() {
        return store;
    }

    public void setStore(Store store) {
        this.store = store;
    }

    public Double getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(Double totalAmount) {
        this.totalAmount = totalAmount;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public LocalDateTime getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(LocalDateTime createdAt) {
        this.createdAt = createdAt;
    }

    public LocalDateTime getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(LocalDateTime updatedAt) {
        this.updatedAt = updatedAt;
    }

    public List<OrderDetail> getOrderDetailList() {
        return orderDetailList;
    }

    public void setOrderDetailList(List<OrderDetail> orderDetailList) {
        this.orderDetailList = orderDetailList;
    }

    @Override
    public String toString() {
        return "Order{" +
                "orderId=" + orderId +
                ", member=" + member +
                ", store=" + store +
                ", totalAmount=" + totalAmount +
                ", status='" + status + '\'' +
                ", createdAt=" + createdAt +
                ", updatedAt=" + updatedAt +
                ", orderDetailList=" + orderDetailList +
                "} " + super.toString();
    }
}
